import datetime

from utils.SqlUtil import Base, engine
from sqlalchemy import Column, Integer, String, Date

class BasicData(Base):
    __tablename__ = 'basic_data'

    id = Column(Integer, primary_key=True)
    title = Column(String(200))
    code = Column(String(200))
    url = Column(String(300))
    createTime = Column(Date, name='create_time', default=datetime.datetime.now())

    def __init__(self, title, code, url):
        self.title = title
        self.code = code
        self.url = url